package COM.XYS;

import java.util.ArrayList;
import java.util.Scanner;

public class Demo7Test {
    public static void main(String[] args) {
        ArrayList<Demo7> bbb = new ArrayList <>();
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入学生名字");
        String newname = scan.next();
        System.out.println("请输入学生年龄");
        int newage = scan.nextInt();
        System.out.println("请输入学生的年级");
        String newgrade = scan.next();
        Demo7 student = new Demo7(newname,newage,newgrade);
        bbb.add(student);

        student.toString();
        for (int i = 0; i < bbb.size(); i++) {
            System.out.println(bbb.get(i).toString());
        }


    }
}